dic_city = { "张三风":["北京","成都"], "李茉绸":["上海", "广州", "兰州"], "慕容福":["太原", "西安","济南","上海"] }
count_shanghai = 0
name_shanghai = []
for person, cities in dic_city.items():
    num_cities = len(cities)
    print(f"{person}去过{num_cities}个城市")
    if "上海" in cities:
        count_shanghai += 1
        name_shanghai.append(person)

print(f"去过上海的有{count_shanghai}人,他们是",end='')
print('、'.join(name_shanghai))
